package org.zxl.springbootdemo.valid.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.zxl.springbootdemo.valid.dto.TeacherAddReqDTO;

import javax.validation.Valid;

/**
 * @author xiaolong5.zhang
 * @date 2021/12/25 14:48
 **/
@RestController
public class ValidController {

    @GetMapping("/addTeacher")
    public String addTeacher(@RequestBody @Valid TeacherAddReqDTO reqDTO){
        System.out.println(reqDTO.toString());
        return "0000";
    }
}
